#ifndef _RS485_HARD_DRIVER_COMMON_H_
#define _RS485_HARD_DRIVER_COMMON_H_
#include "stdint.h"
struct rs485_hw
{
    void (*set_oe_to_send)(void);
    void (*set_oe_to_receive)(void);
    void (*start_to_send)(void);
    void (*stop_to_send)(void);
    uint8_t (*check_receive_interrupt_registers_data)(uint8_t *byte);
    void (*start_receive_timeout_timer)(void);
    void (*enable_txe_empty_interrupt)(void);
    void (*send_out_one_byte)(uint8_t);
    uint8_t (*check_txe_empty_interrupt)(void);
    void (*enable_wait_tc_empty_interrupt)(void);
    uint8_t (*check_tc_empty_interrupt)(void);
    uint8_t (*check_receive_timeout_timer_interrput)(void);
};

void rs485_hw_struct_register(struct rs485_hw *rs485_hw,
                              void (*set_oe_to_send)(void),
                              void (*set_oe_to_receive)(void),
                              void (*start_to_send)(void),
                              void (*stop_to_send)(void),
                              uint8_t (*check_receive_interrupt_registers_data)(uint8_t *byte),
                              void (*start_receive_timeout_timer)(void),
                              void (*enable_txe_empty_interrupt)(void),
                              void (*send_out_one_byte)(uint8_t data),
                              uint8_t (*check_txe_empty_interrupt)(void),
                              void (*enable_wait_tc_empty_interrupt)(void),
                              uint8_t (*check_tc_empty_interrupt)(void),
                              uint8_t (*check_receive_timeout_timer_interrput)(void),
                              void (*rs485_hard_init)(void));

#endif /** */
/* _RS485_HARD_DRIVER_COMMON_H_ */
